<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <div class="breadcrumb_wrap">
        <ul class="breadcrumb">
            <li>您的位置：</li>
            <li> <a href="product_list.html">旧物管理</a> <span class="divider">></span> </li>
            <li> <a href="product_list.html">旧物信息</a> <span class="divider">></span> </li>
            <li class="active">列表</li>
        </ul>
    </div>
    <ul id="myTab" class="nav nav-tabs pro_nav_tabs">
        <li class="active"> <a href="product_list.html" >产品信息</a> </li>
        <!--<li> <a href="product_type_list.html">产品类型</a> </li>-->
    </ul>
    <div class="select_box " >
        <form class="form-horizontal" role="form">
            <div class="form-group col-md-4">
                <label class="control-label">产品名：</label>
                <input type="text" class="form-control" ng-model="oldParam.title">
            </div>
            <div class="form-group col-md-4">
                <label class="control-label">产品分类：</label>
                <select class="form-control" ng-model="oldParam.type">
                    <option value="">--请选择--</option>
                    <option ng-repeat="type in typeList" value="{{type.id}}">{{type.typeName}}</option>
                </select>
            </div>
            <div class="form-group col-md-4">
                <label class="control-label">产品状态：</label>
                <select class="form-control" ng-model="oldParam.status">
                    <option value="">--请选择--</option>
                    <option value="0">未审核</option>
                    <option value="1">审核通过</option>
                    <option value="2">审核未通过</option>
                </select>
            </div>

            <div class="form-group col-md-4 button_box ">
                <button type="button" ng-click="searchOldList()" class="btn btn-primary" ><i class="glyphicon glyphicon-search"></i>搜索</button>
            </div>
        </form>
    </div>
    <div class="button_box table_btn_box">
        <a href="/xdd/common/oldGoods_add"><button type="button" class="btn btn-primary btn_add"><i class="glyphicon glyphicon-plus"></i>新增</button></a>
    </div>
    <div class="table-responsive con_list">
        <table class="table table-striped">
            <thead>
            <tr>
                <th style="text-align:center;width: 2px;"><input type="checkbox" class="ng-valid ng-dirty" ng-model="allChecked" ng-click="allCheckedBtn()"></th>
                <th>标题</th>
                <th>价格/元</th>
                <th>单件商品重量/克</th>
                <th>旧物类型</th>
                <th>旧物审核状态</th>
                <th>旧物交易状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="old in oldGoodsList">
                <td style="text-align: center"><input type="checkbox" value="{{old.id}}" name="oldId"></td>
                <td><a href="/xdd/common/oldGoods/{{old.id}}">{{old.title}}</a></td>
                <td>{{old.price}}元/g</td>
                <td>{{old.perWeight}}g</td>
                <td>{{old.typeName}}</td>
                <td  ng-if="old.status==0"> <span class="state down"> 未审核</span></td>
                <td  ng-if="old.status==1"><span class="state"> 审核通过</span></td>
                <td ng-if="old.status==2"> <span class="state down"> 审核未通过</span></td>
                <td ng-if="old.dealStatus==0"><span class="state down"> 未交易</span></td>
                <td  ng-if="old.dealStatus==1"> <span class="state"> 已交易</span></td>
                <td class="ops">
                    <a href="/xdd/common/oldGoodsUpdate/{{old.id}}"><button type="button" class="btn btn-primary editor">修改</button></a>
                    <button type="button" class="btn btn-primary examine" ng-click="checkOld(old.id)">审核</button>
                    <button ng-if="old.dealStatus==1" class="btn btn-primary del" ng-click="updateStatus(old,0)">未交易</button>
                    <button ng-if="old.dealStatus==0" class="btn btn-primary" ng-click="updateStatus(old,1)">完成交易</button>
                    <button type="button" class="btn btn-primary del" ng-click="deleteOld(old.id)">删除</button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <div class="page_wrap">
        <div class="text-center scott">
            <uib-pagination  total-items="totalItems" ng-model="currentPage" boundary-links="true" max-size="5"   ng-change="pageChanged()" items-per-page="itemsPerPage" previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
        </div>
    </div>
</div>